import os
import torch
import numpy as np

def triu(x, diagonal=0):
    return torch.triu(x, diagonal)

def gen_golden_data_simple():
    input_x = np.random.uniform(-10, 10, [2, 3, 799, 1334]).astype(np.float16)
    golden = triu(torch.Tensor(input_x), diagonal=-33).numpy().astype(np.float16)
    os.system("mkdir -p input")
    os.system("mkdir -p output")
    input_x.tofile("./input/input_x.bin")
    golden.tofile("./output/golden.bin")

if __name__ == "__main__":
    gen_golden_data_simple()
